﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VideoClassLibrary.Model;
using VideoClassLibrary.BusinessLogicLayer;

public partial class NewsAndNoticeManagement_AddRecruitMessage : AdminUserBase
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnAdd_Click(object sender, EventArgs e)
    {

        V_RecruitStudent recru = new V_RecruitStudent();
        RecruitMessageModule Rec = new RecruitMessageModule();
        recru.RecruitTitle = this.txtRecruitTitle.Text;
        recru.RecruitContent = this.edRecruitContent.Text;
        //recru.IsPulished = 0;//Convert.ToInt32(RadioButtonList1.SelectedValue);
        recru.IsPulished = Convert.ToInt32(RadioButtonList1.SelectedValue);
        recru.SchoolId = CurrentUser.SchoolID;
        recru.CreateTime = Convert.ToDateTime(DateTime.Now);
        recru.Author = this.CurrentUser.VA_loginname;
        int result=Rec.AddRecruitMessage(recru);
        if (result > 0)
        {
            PageHelper.AlterMsgAndRedirect("添加成功！", "RecruitMessageList.aspx");
        }
        else
        {
            PageHelper.AlterMsg("添加失败！");
        }
    }
}
